Skip to content

feat(launcher): open submodule tabs next to parent with prefixed titles - #2613

Closed
berkanuslu wants to merge 5 commits into
sourcegit-scm:developfrom
berkanuslu:master
Closed

feat(launcher): open submodule tabs next to parent with prefixed titles#2613
berkanuslu wants to merge 5 commits into
sourcegit-scm:developfrom
berkanuslu:master

Conversation

@berkanuslu

Copy link
Copy Markdown

Submodule tabs now insert right after the parent repo tab instead of appending at end, and display a Parent : Submodule title for quick identification.

Changes

  • Tab placement — Pass parent page hint through OpenRepositoryInTab so submodule tabs insert at parentIdx + 1
  • Title prefix — Compose "ParentName : SubfolderName" for submodule tab titles using a single ComposeSubmoduleTitle helper
  • Live rename sync — Recompose title on every open so renaming the parent immediately reflects in child tabs

Before / After

Before After
A, B, C, D → open submodule in B → A, B, C, D, BB A, B, C, D → open submodule in B → A, B, B : BB, C, D

Files Changed

  • src/ViewModels/Launcher.cs — tab insertion logic + title composition
  • src/ViewModels/Repository.cs — pass parent page to launcher

Submodule tabs now insert right after the parent repo tab instead of
appending at end. Makes related repos visually grouped.

- Pass parent page hint from OpenSubmodule through both overloads
- Insert new tab at parentIdx + 1 when parent is a repository
Comment thread src/ViewModels/Launcher.cs Outdated
@berkanuslu
berkanuslu force-pushed the master branch 2 times, most recently from 71d275c to bc3e3bc Compare August 21, 2026 10:58
@love-linger

Copy link
Copy Markdown
Collaborator

I've pushed my implemetation for this feature.

  • Create another method OpenSubRepository instead of modify the existing one OpenRepositoryInTab because some calculation is not necessary for submodules.
  • It will open submodule next to the owner page
  • It will set the name to <owner_pure_name>: <submodule> by default. For example: when open a nexted submodule C from another submodule A: B, the tab's name will be B: C instead of A: B: C by default. But after you edit the tab name manually, SourceGit will use it instead of the default one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants